\hypertarget{class_msg_queue}{\section{Msg\+Queue类 参考}
\label{class_msg_queue}\index{Msg\+Queue@{Msg\+Queue}}
}


消息队列类  




{\ttfamily \#include $<$Msg\+Queue.\+h$>$}

\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
sint32 \hyperlink{class_msg_queue_acdccfe1b0227ba28c7d7b1b8f9dc5db8}{send\+Msg} (\hyperlink{struct_queue_msg___s}{Queue\+Msg\+\_\+\+S} \&msg)
\begin{DoxyCompactList}\small\item\em 发送消息 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_msg_queue_a715d9b99d7e7bbc044f16c2d59db703b}{recv\+Msg} (\hyperlink{struct_queue_msg___s}{Queue\+Msg\+\_\+\+S} \&msg, sint32 msg\+Type=0)
\begin{DoxyCompactList}\small\item\em 接收消息 \end{DoxyCompactList}\item 
sint32 \hyperlink{class_msg_queue_a3cc24b095e3ce7217f0aeb9efbbad907}{clear\+Msg} (sint32 msg\+Type=0)
\begin{DoxyCompactList}\small\item\em 清空消息 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{友元}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_msg_queue_a2fa641214ea6b38582e711fd1b40b198}{class {\bfseries Msg\+Queue\+Factory}}\label{class_msg_queue_a2fa641214ea6b38582e711fd1b40b198}

\end{DoxyCompactItemize}


\subsection{详细描述}
消息队列类 

\subsection{成员函数说明}
\hypertarget{class_msg_queue_a3cc24b095e3ce7217f0aeb9efbbad907}{\index{Msg\+Queue@{Msg\+Queue}!clear\+Msg@{clear\+Msg}}
\index{clear\+Msg@{clear\+Msg}!Msg\+Queue@{Msg\+Queue}}
\subsubsection[{clear\+Msg}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Msg\+Queue\+::clear\+Msg (
\begin{DoxyParamCaption}
\item[{sint32}]{msg\+Type = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}\label{class_msg_queue_a3cc24b095e3ce7217f0aeb9efbbad907}


清空消息 


\begin{DoxyParams}{参数}
{\em msg\+Type} & 消息体 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
msg\+Type=0 清空队列中所有的消息 msg\+Type$>$0 清空队列中类型值为msg\+Type的消息 msg\+Type$<$0 清空队列中类型值小于或等于$\vert$msg\+Type$\vert$的消息 
\end{DoxyNote}
\hypertarget{class_msg_queue_a715d9b99d7e7bbc044f16c2d59db703b}{\index{Msg\+Queue@{Msg\+Queue}!recv\+Msg@{recv\+Msg}}
\index{recv\+Msg@{recv\+Msg}!Msg\+Queue@{Msg\+Queue}}
\subsubsection[{recv\+Msg}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Msg\+Queue\+::recv\+Msg (
\begin{DoxyParamCaption}
\item[{{\bf Queue\+Msg\+\_\+\+S} \&}]{msg, }
\item[{sint32}]{msg\+Type = {\ttfamily 0}}
\end{DoxyParamCaption}
)}}\label{class_msg_queue_a715d9b99d7e7bbc044f16c2d59db703b}


接收消息 


\begin{DoxyParams}{参数}
{\em msg} & 消息体 \\
\hline
{\em msg\+Type} & 消息类型 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_msg_queue_acdccfe1b0227ba28c7d7b1b8f9dc5db8}{\index{Msg\+Queue@{Msg\+Queue}!send\+Msg@{send\+Msg}}
\index{send\+Msg@{send\+Msg}!Msg\+Queue@{Msg\+Queue}}
\subsubsection[{send\+Msg}]{\setlength{\rightskip}{0pt plus 5cm}sint32 Msg\+Queue\+::send\+Msg (
\begin{DoxyParamCaption}
\item[{{\bf Queue\+Msg\+\_\+\+S} \&}]{msg}
\end{DoxyParamCaption}
)}}\label{class_msg_queue_acdccfe1b0227ba28c7d7b1b8f9dc5db8}


发送消息 


\begin{DoxyParams}{参数}
{\em msg} & 消息体 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
成功返回\+S\+T\+A\+T\+U\+S\+\_\+\+O\+K,失败返回\+S\+T\+A\+T\+U\+S\+\_\+\+E\+R\+R\+O\+R 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_msg_queue_8h}{Msg\+Queue.\+h}\item 
libemb/src/Msg\+Queue.\+cpp\end{DoxyCompactItemize}
